<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./js/vue.js"></script>
</head>
<body>
    <div id="app">
        <p>商品名称：{{cart.name}}</p>
        <p>商品单价：{{cart.price}}</p>
        <p>商品数量：<input type="text" v-model="cart.num"></p>
        <p>商品数量：{{cart.num * cart.price}}</p>
    </div>
    <script>
        let vm = new Vue({
            el: '#app',
            data: {
                cart: {
                    name: 'iphone 13 1Tb',
                    price: 8668,
                    num: 2
                }
            }
            // vm.cart.num=999 哪个是model？哪个是view？
        })
    </script>
</body>
</html>